<?php

namespace App\Http\Controllers\Web;

use App\Http\Controllers\Controller;
use App\Repositories\ScanRepository;
use Illuminate\Http\Request;

class ScanController extends Controller
{
    protected $scan;
    /**
     * ScanController constructor.
     * @param $Scan
     * Repository
     */
    public function __construct(ScanRepository $scan){
        $this->scan = $scan;
    }

    //获取具体房桌
    public function getOne(Request $request){
        return $this->scan->getOne($request->id);
    }

    //确定下单
    public function addOrder(Request $request){
        return $this->scan->addOrder($request->cart,$request->sightseer);
    }
    //加菜
    public function addDishes(Request $request){
        return $this->scan->addDishes($request->cart);
    }
    //呼叫服务员
    public function callAttendant(Request $request){
        return $this->scan->callAttendant($request->id);
    }


}
